package com.qfedu.dao1;

import com.qfedu.entity.Cart;
import org.apache.ibatis.annotations.Param;

import java.lang.reflect.InvocationTargetException;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.List;

public interface CartDaoByMybatis {
    Cart getCartById(@Param("uid")int uid,@Param("pid") int pid) throws SQLException, InvocationTargetException, IllegalAccessException;
    int addCart(@Param("uid")int uid, @Param("pid")int pid, @Param("cnum")int cnum,@Param("ccount") BigDecimal ccount) throws SQLException;
    int update(@Param("cnum")int cnum, @Param("ccount")BigDecimal ccount, @Param("cid")int cid) throws SQLException;
    List<Cart> getCartListByUid(int uid) throws SQLException, InvocationTargetException, IllegalAccessException;
    int delete(int cid) throws SQLException;
    int deleteCart(int uid) throws SQLException;
}
